package com.fortune.controller.app;

import com.faneui.common.exception.BusinessException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("appinvest")
public class AppInvestController {

    @RequestMapping(value = "", method = RequestMethod.GET)
    public ModelAndView indexOfAll() throws BusinessException {
        ModelAndView mv = new ModelAndView("appinvest");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }

    @RequestMapping(value = "/productinfo", method = RequestMethod.GET)
    public ModelAndView productInfo() throws BusinessException {
        ModelAndView mv = new ModelAndView("appproductinfo");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }

    @RequestMapping(value = "/buyproduct", method = RequestMethod.GET)
    public ModelAndView buyProduct() throws BusinessException {
        ModelAndView mv = new ModelAndView("buyproduct");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }

    @RequestMapping(value = "/confirmbuy", method = RequestMethod.GET)
    public ModelAndView confirmBuy() throws BusinessException {
        ModelAndView mv = new ModelAndView("confirmbuy");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }

    @RequestMapping(value = "/buysuccess", method = RequestMethod.GET)
    public ModelAndView buySuccess() throws BusinessException {
        ModelAndView mv = new ModelAndView("buysuccess");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }

    @RequestMapping(value = "/buyotherproduct", method = RequestMethod.GET)
    public ModelAndView buyOtherProduct() throws BusinessException {
        ModelAndView mv = new ModelAndView("buyotherproduct");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }

    @RequestMapping(value = "/productdetail", method = RequestMethod.GET)
    public ModelAndView ProductDetail() throws BusinessException {
        ModelAndView mv = new ModelAndView("productdetail");
        mv.addObject("menuFlag", "appinvest");
        return mv;
    }
}
